package com.ajim.demo.controller;

import com.ajim.demo.service.DemoService;
import com.ajim.mvc.anno.MyAutoWired;
import com.ajim.mvc.anno.MyController;
import com.ajim.mvc.anno.MyRequestMapping;

import javax.servlet.http.HttpServletResponse;

@MyController
@MyRequestMapping("/demo")
public class DemoController {

    @MyAutoWired
    private DemoService demoService;

    @MyRequestMapping("/query")
    public String query(HttpServletResponse resp,String name) {
        System.out.println(name);
        return demoService.getAname(name);
    }
}
